#include <stdio.h>

// 计算一个数各位数字之和
int f(int n) {
    int sum = 0;
    while (n > 0) {
        sum += n % 10;
        n /= 10;
    }
    return sum;
}

int main() {
    int N;
    scanf("%d", &N);

    int step = 1;
    while (1) {
        int sum = f(N);
        int next = sum * 3 + 1;
        printf("%d:%d\n", step, next);
        step++;
        if (next == N) {
            break;
        }
        N = next;
    }

    return 0;
}
